package cn.ahaoweb.drule.core.configuration;

import java.util.HashMap;
import java.util.Map;

/**
 * @Name: ConfigurationImpl
 * @Description:
 * @Author: wangzhonghao
 * @Date: 2025/2/12 16:03
 */
public class ConfigurationImpl implements Configuration{

    private Map<String,String> properties = new HashMap<>();

    @Override
    public void setProperty(String name, String value) {
        properties.put(name,value);
    }

    @Override
    public String getValue(String name) {
        return properties.get(name);
    }

    public Map<String, String> getProperties() {
        return properties;
    }

    @Override
    public Configuration merge(Configuration target) {
        properties.putAll(target.getProperties());
        return this;
    }

}
